home *** CD-ROM | disk | FTP | other *** search
/ Experimental BBS Explossion 3 / Experimental BBS Explossion III.iso / os2 / ssaver11.zip / ssdll.HLP (.txt) < prev   
OS/2 Help File  |  1993-12-14  |  18KB  |  404 lines

  1.  
  2. ΓòÉΓòÉΓòÉ 1. About ScreenSaver ΓòÉΓòÉΓòÉ
  3.  
  4.                                    Version 1.1
  5.  
  6.  
  7.                       Copyright (C) 1993 Siegfried Hanisch
  8.  
  9.  
  10. Permission to use, copy and distribute this software and its documentation for 
  11. any purpose and without charging more than a nominal fee for copying is hereby 
  12. granted, provided that the above copyright notice appear in all copies and that 
  13. both that copyright notice and this permission notice appear in supporting 
  14. documentation.  This software is provided "as is" without express or implied 
  15. warranty. 
  16.  
  17. ScreenSaver is an easy-to-use 32-bit screen saver for OS/2 2.x. 
  18.  
  19. When ScreenSaver is started, it monitors your keyboard and mouse activity in 
  20. the backgound. If there has not been any activity for some time, the saver 
  21. becomes active. It stays active until the mouse is moved or clicked or a key is 
  22. pressed. You can set various options by double clicking ScreenSaver in the 
  23. window list (press Ctrl+Esc to show the window list). If you want to quit 
  24. ScreenSaver, press the "Exit ScreenSaver" button in the configuration panel. 
  25.  
  26. ScreenSaver has the advantage of low memory consumption and very low CPU usage 
  27. - this means virtually no performance impact on your normal work. 
  28.  
  29. ScreenSaver has a very modular structure: It searches its directory for saver 
  30. modules and selects a module randomly when the saver becomes active. Therefore 
  31. it is very easy to extend ScreenSaver by just copying new saver modules to its 
  32. directory. 
  33. Sample source code for do-it-yourself saver modules is included in the archive; 
  34. see Creating new saver modules for information on how to create your own 
  35. modules. 
  36. Even for people who don't know anything about programming it is possible to 
  37. create their own saver modules; see Creating bitmap saver modules for more 
  38. information. 
  39.  
  40. Related information: 
  41. Options dialog controls 
  42. Note for users of OS/2 2.1 
  43. Contacting the author 
  44.  
  45.  
  46. ΓòÉΓòÉΓòÉ 2. Options dialog controls ΓòÉΓòÉΓòÉ
  47.  
  48. The options dialog allows you to select various ScreenSaver options. The 
  49. settings take effect immediately. 
  50.  
  51. It contains the following controls: 
  52. Close button 
  53. Exit ScreenSaver button 
  54. Timeout slider 
  55. Saver now corner 
  56. Saver now corner enabled 
  57. Saver never corner 
  58. Saver never corner enabled 
  59. Configure module button 
  60. Test module button 
  61. Saver enabled check box 
  62. Mouse sensing check box 
  63. Available saver modules list box 
  64. Low priority check box 
  65. Monitor fullscreen sessions check box 
  66.  
  67. Related information: 
  68. About ScreenSaver 
  69. Note for users of OS/2 2.1 
  70.  
  71.  
  72. ΓòÉΓòÉΓòÉ 2.1. Close button ΓòÉΓòÉΓòÉ
  73.  
  74. The "Close" button closes the Options dialog. You can also press the minimize 
  75. button in the top right corner of the dialog window. 
  76.  
  77. Related information: 
  78. Options dialog controls 
  79. Note for users of OS/2 2.1 
  80. About ScreenSaver 
  81.  
  82.  
  83. ΓòÉΓòÉΓòÉ 2.2. Exit ScreenSaver button ΓòÉΓòÉΓòÉ
  84.  
  85. Use the "Exit ScreenSaver" button to end ScreenSaver. You can also double click 
  86. the system menu or select Close from the system menu in the top left corner of 
  87. the dialog window. 
  88.  
  89. Related information: 
  90. Options dialog controls 
  91.  
  92.  
  93. ΓòÉΓòÉΓòÉ 2.3. Timeout slider ΓòÉΓòÉΓòÉ
  94.  
  95. With the "Timeout" slider you can adjust the time after which the saver becomes 
  96. active. 
  97.  
  98. Related information: 
  99. Options dialog controls 
  100.  
  101.  
  102. ΓòÉΓòÉΓòÉ 2.4. Saver now corner ΓòÉΓòÉΓòÉ
  103.  
  104. Use these radio buttons to select the corner of the screen into which you have 
  105. to move the mouse pointer to activate the saver immediately. 
  106.  
  107. Related information: 
  108. Options dialog controls 
  109.  
  110.  
  111. ΓòÉΓòÉΓòÉ 2.5. Saver now corner enabled ΓòÉΓòÉΓòÉ
  112.  
  113. With this check box you can enable and disable the "saver now" feature. 
  114.  
  115. Related information: 
  116. Saver now corner 
  117. Options dialog controls 
  118.  
  119.  
  120. ΓòÉΓòÉΓòÉ 2.6. Saver never corner ΓòÉΓòÉΓòÉ
  121.  
  122. With these radio buttons you can select the corner of the screen into which you 
  123. have to move the mouse pointer to temporarily disable monitoring mouse and 
  124. keyboard activity. 
  125.  
  126. Related information: 
  127. Options dialog controls 
  128.  
  129.  
  130. ΓòÉΓòÉΓòÉ 2.7. Saver never corner enabled ΓòÉΓòÉΓòÉ
  131.  
  132. With this check box you can enable and disable the "saver never" feature. 
  133.  
  134. Related information: 
  135. Saver never corner 
  136. Options dialog controls 
  137.  
  138.  
  139. ΓòÉΓòÉΓòÉ 2.8. Configure module button ΓòÉΓòÉΓòÉ
  140.  
  141. This button displays the configuration dialog of the saver module which is 
  142. selected in the list box. You can also double click on the list box item to 
  143. display the corresponding configuration dialog, too. Press the '+' or '-' keys 
  144. to directly enable or disable a saver module. 
  145.  
  146. Related information: 
  147. Options dialog controls 
  148.  
  149.  
  150. ΓòÉΓòÉΓòÉ 2.9. Test module button ΓòÉΓòÉΓòÉ
  151.  
  152. This button activates the saver module that is selected in the list box. To 
  153. stop the test, either move the mouse or click a mouse button or press a key. 
  154.  
  155. Related information: 
  156. Options dialog controls 
  157.  
  158.  
  159. ΓòÉΓòÉΓòÉ 2.10. Saver enabled check box ΓòÉΓòÉΓòÉ
  160.  
  161. Use the "Saver enabled" check box to enable or disable screen saving. 
  162.  
  163. Related information: 
  164. Options dialog controls 
  165.  
  166.  
  167. ΓòÉΓòÉΓòÉ 2.11. Mouse sensing check box ΓòÉΓòÉΓòÉ
  168.  
  169. The "Mouse sensing" check box enables or disables monitoring of mouse movement 
  170. while the saver is active. This means, if mouse sensing is disabled and the 
  171. saver is active, the saver can only be stopped by pressing a key or clicking a 
  172. mouse button, but not by moving the mouse; this may be useful if you do not 
  173. want the saver to stop if you accidentially touch the mouse. 
  174.  
  175. Related information: 
  176. Options dialog controls 
  177.  
  178.  
  179. ΓòÉΓòÉΓòÉ 2.12. Available saver modules list box ΓòÉΓòÉΓòÉ
  180.  
  181. The "Available saver modules" list box shows all available saver modules. 
  182. Double clicking on a list box item displays the corresponding configuration 
  183. dialog. A plus sign in front of a module name means the module is enabled, a 
  184. minus sign means it is disabled. You can enable or disable a module in its 
  185. configuration dialog or by highlighting it and pressing '+' or '-'. When the 
  186. timeout interval expires, ScreenSaver chooses one of the enabled saver modules 
  187. randomly. If all modules are disabled, the built-in "Eternal Blackness" module 
  188. is used for screen saving. 
  189.  
  190. Related information: 
  191. Options dialog controls 
  192. Note for users of OS/2 2.1 
  193. About ScreenSaver 
  194.  
  195.  
  196. ΓòÉΓòÉΓòÉ 2.13. Low priority check box ΓòÉΓòÉΓòÉ
  197.  
  198. Use the "Low priority" check box to decide wether the saver, when activated, 
  199. should run with low priority or normal priority. On low priority the saver gets 
  200. CPU time only when no other application requests CPU time. Normal priority 
  201. means the saver shares CPU usage with all other tasks; this means the animation 
  202. is smoother, but other applications may run slightly slower. Some saver module 
  203. animations may work considerably slower when low priority is disabled. 
  204.  
  205. Related information: 
  206. Options dialog controls 
  207.  
  208.  
  209. ΓòÉΓòÉΓòÉ 2.14. Monitor fullscreen sessions check box ΓòÉΓòÉΓòÉ
  210.  
  211. If monitoring of fullscreen sessions is enabled, ScreenSaver will switch from 
  212. an active fullscreen session to the Presentation Manager when the timeout 
  213. interval expires to do its saver action. When a key is pressed or the mouse is 
  214. moved, ScreenSaver switches back to the fullscreen session. 
  215.  
  216. In this version only OS/2 fullscreen sessions are monitored. DOS fullscreen 
  217. sessions and Win-OS/2 fullscreen sessions are not monitored. 
  218.  
  219. This option is not available on OS/2 2.0. 
  220.  
  221. Related information: 
  222. Options dialog controls 
  223.  
  224.  
  225. ΓòÉΓòÉΓòÉ 3. Creating your own saver modules ΓòÉΓòÉΓòÉ
  226.  
  227. The following two sections describe how to create saver modules: 
  228. Creating bitmap saver modules 
  229. Creating new saver modules 
  230.  
  231.  
  232. ΓòÉΓòÉΓòÉ 3.1. Creating bitmap saver modules ΓòÉΓòÉΓòÉ
  233.  
  234. Even for a non-programmer, it is VERY easy to create new bitmap saver modules. 
  235. There are six steps involved in doing so: 
  236.  
  237.  1. Open an OS/2 command session, change your working directory to the 
  238.     ScreenSaver directory, and make sure the files BITMAPS.RES, BITMAPS.SSM, 
  239.     BMPSAMP.RC and MAKEMOD.EXE are there. If they are not, unzip them from the 
  240.     file CUSTBMP.ZIP (CUSTBMP.ZIP can be found in the ScreenSaver distribution 
  241.     file). 
  242.  2. Get some pictures in bitmap format (*.BMP). 
  243.     You can create bitmaps by scanning photographs, you can convert existing 
  244.     pictures from other formats (*.GIF, *.TIF etc.) to bitmap format with 
  245.     appropriate software, or you can draw them yourself (with the OS/2 Icon 
  246.     Editor or Paintbrush or any other program that can handle bitmap files). 
  247.     Copy all the bitmaps you want to use to the ScreenSaver directory. 
  248.  3. Choose a name for the new saver module and a name for the file in which 
  249.     your saver is stored. The name for the file must be exactly 8 characters 
  250.     long; the name of the saver module should have a maximum length of 32 
  251.     characters. Now type "COPY BMPSAMP.RC FILENAME.RC" and press Enter (replace 
  252.     FILENAME with the file name you chose). Load the new file into an editor. 
  253.     You can use the OS/2 system editor E.EXE to edit the file. 
  254.  4. Replace the string "Custom Bitmaps" with the name you chose for your saver 
  255.     module. Do not change the number in front of the string. 
  256.  5. Insert lines with the name of your bitmap files. The lines must have the 
  257.     following format: 
  258.  
  259.         BITMAP  number  bitmap-file-name
  260.  
  261.     The numbers must be consecutive and in ascending order (in the first line 
  262.     inserted number must be 1, in the second 2 and so on). 
  263.     There is no limit on the number of bitmaps in your saver module. Now save 
  264.     the file and quit the editor. 
  265.  6. Type "MAKEMOD FILENAME" (again, replace FILENAME with the file name you 
  266.     chose) and press Enter. If everything is ok, MAKEMOD tells you that it 
  267.     created the new module. In case of an error, MAKEMOD prints an error 
  268.     message and some hints what you should do; it is most likely that you 
  269.     mistyped the name of a bitmap file. 
  270.     If module creation was successful you have to restart ScreenSaver. The name 
  271.     of the new module should be listed in the "Available saver modules" list 
  272.     box then. 
  273.  
  274. The following tutorial shows how to build a new bitmap module. 
  275. Assume that you want to use the three bitmaps ME.BMP, YOU.BMP and DOG_BOO.BMP; 
  276. you chose the name of the saver module to be "My Family" and the name of the 
  277. saver module file to be "MYFAMILY". 
  278. You enter 
  279.  
  280. COPY BMPSAMP.RC MYFAMILY.RC
  281.  
  282. at the command prompt. Then edit the new file (in this example we use the OS/2 
  283. system editor E.EXE) 
  284.  
  285. E MYFAMILY.RC
  286.  
  287. and change the file contents to look like this. 
  288.  
  289. The part of the file that is marked green  (the text between "/*" and "*/") is 
  290. a comment. You can include your own comments if you like. 
  291. The red text is the module name you insert and the cyan text are the lines 
  292. enumerating the bitmap files. The rest of the text has to be there; don't alter 
  293. it. Note that the name of the module and the names of the bitmap files have to 
  294. be enclosed in double quotation marks. 
  295.  
  296. /*
  297.     MYFAMILY.RC
  298.     resource file for custom bitmaps saver module
  299. */
  300. STRINGTABLE
  301. {
  302.     1    "My Family"
  303. }
  304. BITMAP  1    "ME.BMP"
  305. BITMAP  2    "YOU.BMP"
  306. BITMAP  3    "DOG_BOO.BMP"
  307.  
  308. Now save the file, quit the editor and type 
  309.  
  310. MAKEMOD MYFAMILY
  311.  
  312. at the command prompt. MAKEMOD prints a few messages as it works, and finally a 
  313. success message or a self-explanatory error message. 
  314. Now you restart ScreenSaver. The item "My Family" should appear in the list 
  315. box. 
  316.  
  317. Related information: 
  318. Creating new saver modules 
  319.  
  320.  
  321. ΓòÉΓòÉΓòÉ 3.2. Creating new saver modules ΓòÉΓòÉΓòÉ
  322.  
  323. You should have some experience with Presentation Manager programming and 
  324. knowledge of the C programming language to create your own saver modules. 
  325. The ScreenSaver archive comprises sample source code that shows you how to do 
  326. it. Unzip the files sample.c, sample.h, sample.rc, sample.dlg, sample.def and 
  327. sample.mak from the file SAMPLE.ZIP (SAMPLE.ZIP can be found in the ScreenSaver 
  328. distribution file) and copy these files to some other name of your choice (keep 
  329. the original extensions). If you compile and link in another directory than the 
  330. ScreenSaver directory, also copy the file SSAVER.ICO to your working directory. 
  331. Now take a look at these files. They are are commented and contain something 
  332. like 
  333.  
  334. /*
  335.     $$$$$ insert code here $$$$$
  336.     ... comment ...
  337.  
  338.     $$$$$ for example $$$$$
  339.     ... example code ...
  340. */
  341.  
  342. at those places where you should fill in your code. You can't miss it. Be sure 
  343. to read the comments before inserting your code. 
  344. In the "for example" sections of the comments you will find the source code of 
  345. the "Pyramids" saver module that comes with the ScreenSaver distribution. You 
  346. can use it as a template for creating your own saver modules. 
  347. After having successfully compiled your new module the first time, you can use 
  348. the Dialog Editor to edit the *.RES file and change the configure dialog if 
  349. required. 
  350. You should be able to use EMX0.8g (or higher) or the IBM compiler to build new 
  351. modules. Maybe other compilers work too, but I have not tested that. 
  352.  
  353. Now some explanations how a saver module works: 
  354. After the timeout occurred, the ScreenSaver program loads a saver module into 
  355. memory and makes it start screen saving. The saver module creates a window that 
  356. has the size of the whole screen. It then starts a second thread (the one you 
  357. will have to write the code for) that draws anything it wants in this window; 
  358. see the sample code for more information. When the ScreenSaver program stops 
  359. the saver module, the second thread ends, the window is destroyed and the saver 
  360. module is unloaded from memory. The idea is, that the second thread can run 
  361. with idle time priority without considering any processing of PM messages. 
  362.  
  363. Since version 1.0 there were minor changes in the sample files. These changes 
  364. are marked in the source file like the following line: 
  365. // !!!!! changes since version x.x 
  366.  
  367. Related information: 
  368. Creating bitmap saver modules 
  369.  
  370.  
  371. ΓòÉΓòÉΓòÉ 4. Note for users of OS/2 2.1 ΓòÉΓòÉΓòÉ
  372.  
  373. There is a known bug in OS/2 2.1 which sometimes prevents applications from 
  374. saving their data to the OS/2 INI-files. Therefore, if you experience that the 
  375. ScreenSaver options are not saved correctly, please try the following solution: 
  376.  
  377. Add the line 
  378.  
  379. attrib -r x:\os2\os2*.ini
  380.  
  381. to the file x:\startup.cmd (x is the drive letter of your boot drive; if the 
  382. file x:\startup.cmd does not exist, create it) and reboot. 
  383.  
  384.  
  385. ΓòÉΓòÉΓòÉ 5. Contacting the author ΓòÉΓòÉΓòÉ
  386.  
  387. My mail address is 
  388.  
  389. Siegfried Hanisch 
  390. Einsiedlergasse 6/16 
  391. A - 1050 Vienna 
  392. AUSTRIA / EUROPE 
  393.  
  394. My Internet address is 
  395.  
  396. hanisch@swwwnext.tuwien.ac.at 
  397.  
  398. Please send any suggestions, comments or bug reports to one of the above 
  399. addresses. 
  400.  
  401. If you have questions concerning the programming of new saver modules, please 
  402. contact me via e-mail. 
  403.  
  404. If you like ScreenSaver please feel free to make a donation to the author.